
const app = new Vue({
	// el: "",
	// data: {
	// 	msg: "hello form"
	// },
	data() {
		return {
			msg: "hello form",
			checked: false,
			checkedNames: ["Jack", "Mike"],
			sex: "nan",
			city: "6103",
			selected: ["C"],
			toggle: "",
			///////
			userinfo: {
				uname: "",
				pwd: "",
				desc: "",
				sex: "",
				aihao: [],
				city: "",
				isAgree: false
			},
			bmiData: {
				height: "",
				weight: ""
			}
		}
	},
	computed: {},
	watch: {},
	methods: {
		handleUserInfo() {
			if(this.userinfo.isAgree) {
				console.log(this.userinfo)
			} else {
				alert("请勾选协议")
			}
			
			// console.log(this.uname)
			// console.log(this.pwd)
			// console.log(this.desc)
			
			/*{
				uname: this.uname,
				pwd: this.pwd,
				...
			}*/
		},
		handleSubmit() {
			// console.log(this.city)
			// console.log(this.sex)
			// console.log(this.checkedNames)
			// console.log(this.checked)
			// console.log(typeof this.msg)
			console.log(this.msg)
		},
		handleChange(event) {
			this.msg = event.target.value
		}
	},
	// vue, react, angular, weapp
	beforeCreate() {},
	created() {	},
	beforeMount() {},
	mounted() {},
	beforeUpdate() {},
	updated() {},
	beforeDestroy() {},
	destroyed() {}
}).$mount("#app")





/*
语法糖
class Vue {
	constructor(arg) {
	    this.el = arg.el
	}
	$mount() {
		
	}
}

function Vue(options) {
	this.el = options.el
}
Vue.prototype.$mount = 
*/

